﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Marmat.Forms.Skin
{
    /// <summary>
    /// 为 System.Windows.Forms.TreeView.DrawNode 事件提供数据。
    /// </summary>
    public class DrawTreeNodeEventArgs : EventArgs
    {
        /// <summary>
        /// 初始化 System.Windows.Forms.DrawTreeNodeEventArgs 类的新实例。
        /// </summary>
        /// <param name="graphics">System.Drawing.Graphics 在其上绘制图面。</param>
        /// <param name="node">要绘制的 System.Windows.Forms.TreeNode。</param>
        /// <param name="bounds">System.Drawing.Rectangle 在其中进行绘制。</param>
        /// <param name="state">按位组合 System.Windows.Forms.TreeNodeStates 值，该值指示当前状态的 System.Windows.Forms.TreeNode 绘制。</param>
        public DrawTreeNodeEventArgs(Graphics graphics, TreeNode node, Rectangle bounds, TreeNodeStates state)
        {
            this.Graphics = graphics;
            this.Node = node;
            this.Bounds = bounds;
            this.State = state;
        }

        /// <summary>
        /// 获取或设置一个值，该值指示是否 System.Windows.Forms.TreeNode 应由操作系统绘制，而不是由所有者描述的。
        /// </summary>
        /// <remarks>true 如果应由操作系统 绘制节点; false 如果该节点将绘制在事件处理程序。 默认值为 false。</remarks>
        public bool DrawDefault { get; set; }

        /// <summary>
        /// 获取 System.Drawing.Graphics 用于绘制对象 System.Windows.Forms.TreeNode。
        /// </summary>
        /// <remarks>一个 System.Drawing.Graphics 用于绘制 System.Windows.Forms.TreeNode。</remarks>
        public Graphics Graphics { get; }

        /// <summary>
        /// 获取 System.Windows.Forms.TreeNode 绘制。
        /// </summary>
        /// <remarks>要绘制的 System.Windows.Forms.TreeNode。</remarks>
        public TreeNode Node { get; }

        /// <summary>
        /// 获取大小和位置 System.Windows.Forms.TreeNode 绘制。
        /// </summary>
        /// <remarks> 一个 System.Drawing.Rectangle 表示的边界 System.Windows.Forms.TreeNode 绘制。</remarks>
        public Rectangle Bounds { get; }

        /// <summary>
        /// 获取的当前状态 System.Windows.Forms.TreeNode 绘制。
        /// </summary>
        /// <remarks>按位组合 System.Windows.Forms.TreeNodeStates 值，该值指示当前状态的 System.Windows.Forms.TreeNode。</remarks>
        public TreeNodeStates State { get; }
    }
}
